import ajax from '@/utils/ajax'
import dialog from '@/utils/dialog'
import cookie from '@/utils/cookie'

// 进行中的订单
export default function () {
  const iphone = cookie.getCookie('name');
  return ajax({
    url: `/f/empOrder/march?iphone=${iphone}`,
    data: { iphone },
    barLoading: true,
    isNeedLogin: true,
  }).then(resdata => {
    if (resdata) {
      return resdata instanceof Array ? resdata : []
    }else{
      throw '未查询到数据'
    }
  }).catch(() => dialog.showToast('请求失败'))
}
